<!DOCTYPE html>
<html lang="zh-CN" xmlns:wb="http://open.weibo.com/wb">
<head>
  <include file="./Public/Tpl/head.html" title="IP地址归属地" description="查询指定IP地址的归属地,识别网络运营商,当不指定IP参数时直接返回访问者的IP归属地" keywords="IP地址,归属地,IP定位,IP查找,API,Fantwo"/>
</head>
<body>
<include file="./Public/Tpl/nav.html"/>
<div class="container">
  <h3>IP地址归属地API</h3>
  <div class="row">
    <div class="col-md-5">
      <form method="get">
        <div class="form-group">
          <label for="tip">目标IP:</label>
          <input name="ip" id="tip" class="form-control" type="text" placeholder="输入你要查询的IP地址或网站域名"/><br>
        </div>
        <button type="submit" class="btn btn-default">提交</button>
      </form>
    </div>
    <div class="col-md-offset-0 col-md-2">
    </div>
    <div class="col-md-5">
      <div class="panel panel-default">
        <div class="panel-heading">查询结果:</div>
        <div class="panel-body">
          {$location['ip']}<br>{$location['country']}<br>{$location['area']}
        </div>
      </div>
    </div>
  </div>
  <hr>
  <div class="row">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">功能介绍</h3>
      </div>
      <div class="panel-body">
        <ol>
          <li>输入你要查询归属地地址的IP或者域名，IP地址的格式为xxx.xxx.xxx.xxx，其中x代表数字</li>
          <li>本工具采用网上16年2月10日的qqwry.dat数据库，数据可靠，信息量多，与目前网上主流的IP归属地数据基本保持一致。</li>
          <li>API调用方式:<span>
            <php>echo "http://".I('server.SERVER_NAME').explode('?',I('server.REQUEST_URI'))[0];</php>?qq=你的QQ号&ip=ip地址</span>
            <small>(数据格式见请求结果)</small>
          </li>
        </ol>
      </div>
    </div>
  </div>
</div>
<include file="./Public/Tpl/footer.html"/>
</body>
</html>